package com.qianniu.napi.admin.service;

import com.qianniu.napi.admin.entity.*;
import org.redisson.api.RAtomicLong;
import org.redisson.api.RBucket;
import org.redisson.api.RedissonClient;

import java.util.List;
import java.util.concurrent.TimeUnit;

public interface IRedisService {

    public Boolean isnull(String key);

    public Boolean isExists(String key);

    public <T> T get(String key);

    /**
     * 获取原子数
     * @param key
     * @return
     */
    public RAtomicLong getRAtomicLong(String key);

    public <T> void set(String rkey,T t);

    public <T> void setList(String rkey,T t);

    public <T> List<T> getList(String rkey);

    public <T> void set(String rkey, T t,long ts,TimeUnit tu);

    public <T> void del(String rkey);

    public User getUser();

    public User getUser(Long uid);

    public Store getStore();

    public Store getStore(Long sid);

    public void delUserByguid(String guid);
//    public Fenxiao getFenxiao();

    public void delUser();

    public void delUser(Long uid);

    public User getUserByGuid(String guid);

    public User getUserByOpenid(String openid);

    public Long getLeagueid();

    public Long getLeagueid(Long sid);

    public MerchantApp getMApp();

    public MerchantApp getMApp(Long mpid);

    public MerchantConfig getMconfig();

    public MerchantConfig getMconfig(Long mpid);

    public FanConfig getFanconfig(Long mpid);

    public String getOem(Long mpid,String guid);

    public String getOemphone(Long mpid,String guid);

    public String getWxtoken();

    public String getWxtoken(String mpid);

    public String getWxactoken(String mpid);

    public Long getLeagueAdminuser(Long sid);

    public Long getLeagueAdminuser();

    public Long getStoreAdminuser(Long sid);

}
